<div ng-controller="ProjectController" class="wrapper-md">
  <div class="panel panel-default">
      <div class="panel-heading">
          <h3 class="panel-title">{{body.queryTitle}}</h3>
      </div>
      <div class="panel-body">
          <div class="row col-md-12">
            <form class="form-inline">
              <div class="form-group">
                <label for="">名称:</label>
                <input type="text" class="form-control"  placeholder="" ng-model="query.name">
              </div>
              <!-- <div class="form-group">
                <label for="">Email</label>
                <input type="email" class="form-control"  placeholder="">
              </div> -->
              <button type="button" class="btn btn-success" ng-click="search()">搜索</button>
              <button class="btn btn-success" ng-click="add()">新增</button>
            </form>
          </div>
      </div>
  </div>

  <div class="panel panel-default">
      <div class="panel-heading">
          <h3 class="panel-title">{{body.tableTitle}}</h3>
      </div>
      <div class="panel-body project-list flex">
          <div class="card-item -tap" ng-repeat="p in projectArr">
              <div class="el-card self-box-card is-never-shadow">
                  <div class="el-card__body">
                      <section  class="card-wrap flex">
                          <section class="project-logo-wrap flex xy-axis-center">
                              <img src="../../img/svg/icon_project.svg" class="project-logo">
                          </section>
                          <section  class="project-info">
                              <p  class="project-title text-over">
                                  <a ui-sref="app.projectInfo({id:p.id})">{{p.name}}</a>
                              </p>
                              <p  class="project-creator flex y-axis-center">
                                  <img class="icon" src="../../img/svg/icon_person.svg"> 超级管理员
                              </p>
                              <p  class="project-create-time flex y-axis-center">
                                  <img  class="icon" src="../../img/svg/icon_time.svg"> {{p.createTime | format}}
                              </p>
                              <p  class="project-create-time flex y-axis-center">
                                  <span class="badge bg-success" style="margin-right: 3px" ng-repeat="item in p.label.split(',')">{{item}}</span>
                              </p>
                          </section>
                      </section>
                      <section class="project-buttons flex y-axis-center">
                          <div  class="user-manage flex xy-axis-center" ng-click="info(p)">
                              <img  class="icon" src="../../img/svg/icon_manage_line.svg">详情
                          </div>
                          <div  class="project-edit flex xy-axis-center" ng-click="edit(p)">
                              <img class="icon" src="../../img/svg/icon_edit.svg">编辑
                          </div>
                          <div  class="project-delete flex xy-axis-center" ng-click="delete(p.id)">
                              <img class="icon" src="../../img/svg/icon_delete.svg">删除
                          </div>
                      </section>
                  </div>
              </div>
          </div>
      </div>
      <div class="panel-footer" style="display: flex; justify-content: center;align-items: center;">
          <button class="btn btn-rounded btn-success" style="margin-right: 10px;" ng-click="pre()" disabled="query.pages <= 1">上一页</button>
          <button class="btn btn-rounded btn-success" ng-click="next()" disabled="query.pages >= num">下一页</button>
      </div>
  </div>

  <div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
      <div class="modal-dialog">
          <div class="modal-content">
              <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                  <h4 class="modal-title">{{dialog.title}}</h4>
              </div>
              <div class="modal-body">
                  <form class="form-horizontal">
                      <div class="form-group">
                          <label class="col-sm-2 control-label">名称:</label>
                          <div class="col-sm-10">
                              <input type="text" class="form-control" placeholder="" ng-model="form.name" id="name">
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-sm-2 control-label">描述:</label>
                          <div class="col-sm-10">
                              <textarea type="text" class="form-control" placeholder="" ng-model="form.remark" id="remark">
                              </textarea>
                          </div>
                      </div>
                      <div class="form-group">
                          <label class="col-sm-2 control-label">标签:</label>
                          <div class="col-sm-10">
                              <input ui-jq="tagsinput" class="form-control" ui-options="" style="min-width: 468px;" ng-model="form.label" id="projectLabel"/>
                          </div>
                      </div>
<!--                      <div class="form-group">-->
<!--                          <label class="col-sm-2 control-label">封面:</label>-->
<!--                          <div class="col-sm-10">-->
<!--                              <input type="text" class="form-control" placeholder="" ng-model="form.cover" id="cover">-->
<!--                          </div>-->
<!--                      </div>-->
<!--                      <div class="form-group">-->
<!--                          <label class="col-sm-2 control-label">类型，0公共，1私有:</label>-->
<!--                          <div class="col-sm-10">-->
<!--                              <input type="text" class="form-control" placeholder="" ng-model="form.type" id="type">-->
<!--                          </div>-->
<!--                      </div>-->
<!--                      <div class="form-group">-->
<!--                          <label class="col-sm-2 control-label">项目类型，0默认，1git，2本地:</label>-->
<!--                          <div class="col-sm-10">-->
<!--                              <input type="text" class="form-control" placeholder="" ng-model="form.projectType" id="projectType">-->
<!--                          </div>-->
<!--                      </div>-->
<!--                      <div class="form-group">-->
<!--                          <label class="col-sm-2 control-label">git地址:</label>-->
<!--                          <div class="col-sm-10">-->
<!--                              <input type="text" class="form-control" placeholder="" ng-model="form.gitUrl" id="gitUrl">-->
<!--                          </div>-->
<!--                      </div>-->
<!--                      <div class="form-group">-->
<!--                          <label class="col-sm-2 control-label">账号:</label>-->
<!--                          <div class="col-sm-10">-->
<!--                              <input type="text" class="form-control" placeholder="" ng-model="form.gitUsername" id="gitUsername">-->
<!--                          </div>-->
<!--                      </div>-->
<!--                      <div class="form-group">-->
<!--                          <label class="col-sm-2 control-label">git密码:</label>-->
<!--                          <div class="col-sm-10">-->
<!--                              <input type="text" class="form-control" placeholder="" ng-model="form.gitPassword" id="gitPassword">-->
<!--                          </div>-->
<!--                      </div>-->
<!--                      <div class="form-group">-->
<!--                          <label class="col-sm-2 control-label">本地项目工程模板地址:</label>-->
<!--                          <div class="col-sm-10">-->
<!--                              <input type="text" class="form-control" placeholder="" ng-model="form.localPath" id="localPath">-->
<!--                          </div>-->
<!--                      </div>-->
                    </form>
              </div>
              <div class="modal-footer">
                  <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                  <button type="button" class="btn btn-primary" ng-click="save()">提交</button>
              </div>
          </div><!-- /.modal-content -->
      </div><!-- /.modal -->
  </div>
</div>
